From: Florian Müllner Date: Tue, 27 May 2025 15:48:15 +0000 (+0200) Subject: timeLimitsManager: Don't log transitions from history X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~124^2^2~66 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f35ed41d249098edce9a3a1a0e00bdbb1670e0ad;p=gnome-shell.git timeLimitsManager: Don't log transitions from history The history file can get quite large, with the result that we flood the journal with pages and pages of old transition if debug messages are enabled. Instead, suppress the regular debug log and print a summary message at the end instead. Part-of: --- diff --git a/js/misc/timeLimitsManager.js b/js/misc/timeLimitsManager.js index dd189e285..dd2ddc311 100644 --- a/js/misc/timeLimitsManager.js +++ b/js/misc/timeLimitsManager.js @@ -456,7 +456,7 @@ export const TimeLimitsManager = GObject.registerClass({ } _addTransition(oldState, newState, wallTimeSecs, - {recalculateState = true} = {}) { + {recalculateState = true, debugLog = true} = {}) { this._stateTransitions.push({ oldState, newState, @@ -465,8 +465,10 @@ export const TimeLimitsManager = GObject.registerClass({ this._userState = newState; - console.debug('TimeLimitsManager: User state changed from ' + - `${userStateToString(oldState)} to ${userStateToString(newState)} at ${wallTimeSecs}s`); + if (debugLog) { + console.debug('TimeLimitsManager: User state changed from ' + + `${userStateToString(oldState)} to ${userStateToString(newState)} at ${wallTimeSecs}s`); + } // This potentially changed the limit time and timeout calculations. if (recalculateState && this._state !== TimeLimitsState.DISABLED) { @@ -545,10 +547,13 @@ export const TimeLimitsManager = GObject.registerClass({ entry['newState'], entry['wallTimeSecs'], { recalculateState: i === history.length - 1, + debugLog: false, }); previousWallTimeSecs = entry['wallTimeSecs']; } + console.debug(`TimeLimitsManager: Loaded ${history.length} transitions from history`); + this.thaw_notify(); }